cmake_minimum_required(VERSION 3.0.2)
project(scout_sensor_monitor)

find_package(catkin REQUIRED COMPONENTS
  roscpp
  rospy
  std_msgs
  sensor_msgs
  geometry_msgs
  nav_msgs
  tf2
  tf2_ros
  cv_bridge
  image_transport
  pcl_ros
  pcl_conversions
)

find_package(OpenCV REQUIRED)
find_package(PCL REQUIRED)

catkin_package(
  CATKIN_DEPENDS roscpp rospy std_msgs sensor_msgs geometry_msgs nav_msgs tf2 tf2_ros cv_bridge image_transport pcl_ros pcl_conversions
  DEPENDS OpenCV PCL
)

include_directories(
  ${catkin_INCLUDE_DIRS}
  ${OpenCV_INCLUDE_DIRS}
  ${PCL_INCLUDE_DIRS}
)

# 命令行显示节点
add_executable(velocity_display_node src/velocity_display_node.cpp)
target_link_libraries(velocity_display_node
  ${catkin_LIBRARIES}
  ${OpenCV_LIBRARIES}
)

# OpenCV图像显示节点
add_executable(camera_display_node src/camera_display_node.cpp)
target_link_libraries(camera_display_node
  ${catkin_LIBRARIES}
  ${OpenCV_LIBRARIES}
)

# PCL点云显示节点
add_executable(lidar_display_node src/lidar_display_node.cpp)
target_link_libraries(lidar_display_node
  ${catkin_LIBRARIES}
  ${PCL_LIBRARIES}
)

# 主监控节点
add_executable(sensor_monitor_node src/sensor_monitor_node.cpp)
target_link_libraries(sensor_monitor_node
  ${catkin_LIBRARIES}
  ${OpenCV_LIBRARIES}
  ${PCL_LIBRARIES}
)

# 里程计校准节点
add_executable(odometry_calibration_node src/odometry_calibration_node.cpp)
target_link_libraries(odometry_calibration_node
  ${catkin_LIBRARIES}
)

# 简单里程计演示节点
add_executable(simple_odometry_demo src/simple_odometry_demo.cpp)
target_link_libraries(simple_odometry_demo
  ${catkin_LIBRARIES}
)
